package itsm.isperp.module.utils;


/**
 * 
 * 
 * 
 * @author lizx
 * @date 2015-1-10
 * @since 1.0
 * 
 */
public class EchartGraphLinkUtils {
	/**
	 * 当前时间是否为微信服务台工作时间
	 * 
	 * @return 是否为微信服务台工作时间
	 */
	public static String getSql(String key,String value) {
		String result = "";
		switch (key) {
		//本月工程师完成工单数
		case "incidentGetEgHandleIcd":
		case "incidentGetSlaCount":
		case "incidentGetSatisfactionCount":
			result = "  DATE_FORMAT(create_date, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m') AND  solver_name IS NOT NULL and solver_name='"+value+"'";
			break;
		case "incidentGetProjectUnCloseIcdCount":
			result = "  status<>'已关闭' and project_name='"+value+"'";
			break;
		case "incidentGetStatusUnCloseIcdCount":
			result = "  (STATUS<>'已关闭' and status<>'新建') and status='"+value+"'";
			break;
		case "incidentGetPriUnCloseIcdCount":
			result = "  (STATUS<>'已关闭') and priority_name='"+value+"'";
			break;
		case "incidentGetEgUnCloseIcdCount":
			result = "  (STATUS<>'已关闭' AND supporter_name IS NOT NULL AND supporter_name<>'') and supporter_name='"+value+"'";
			break;
		case "confGetCimtCount":
			result = "  (mainctmonth<>'未过期') and mainctmonth='"+value+"'";
			break;
		case "confGetCiStatusCount":
			result = "   status='"+value+"'";
			break;
		case "confGetCiUseYearCount":
			result = "   inuseyear='"+value+"'";
			break;
		case "confGetCiCustomerCount":
			result = "   cus_name='"+value+"'";
			break;
		case "confGetCiCategoryCount":
			result = "   category_name='"+value+"'";
			break;
		
		}
		return result;
	}
}
